#ifndef _EBOOK_FORMAT_H_
#define _EBOOK_FORMAT_H_

#ifdef _WIN32
#define Debug_printf(x, format, ...) \
do { \
    printf("-" format "", ##__VA_ARGS__ ); \
}while(0)
#else
#include "watch_common.h"
#include "cli.h"
#endif

enum code_format
{
    ANSI_FORMAT,
    UTF_8_NOBOM_FORMAT,
    UTF_8_BOM_FORMAT,
    UTF_16_L_ENDIAN_FORMAT,
    UTF_16_B_ENDIAN_FORMAT,
    UTF_32_L_ENDIAN_FORMAT,
    UTF_32_B_ENDIAN_FORMAT,
    ERROR_FORMAT = 0x0F,
};

uint16_t ebook_gb2312_to_utf8_func(const unsigned char* source_buf, uint16_t source_buf_len, uint8_t* real_buf, uint32_t buf_space);
uint8_t ebook_format_check_string(const unsigned char* check_buf, uint32_t buf_length);

#endif
